package com.example.zhengchaojun.arcgis.adapter;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;


import com.example.zhengchaojun.arcgis.R;
import com.example.zhengchaojun.arcgis.baseadapter.ListViewBaseAdapter;

import java.util.HashMap;
import java.util.List;


/**
 * 类描述：显示轨迹的ListView的adapter
 * 作者：郑朝军 on 2017/12/25
 * 邮箱：1250393285@qq.com
 * 公司：武汉智博创享科技有限公司
 * 修改人：郑朝军 on 2017/12/25
 * 修改备注：
 */
public class TrackAdapter extends ListViewBaseAdapter<HashMap<String, Object>>
{
    private View m_view;

    public TrackAdapter(Activity activity, List<HashMap<String, Object>> list)
    {
        super(activity, list);
    }

    public View getView(final int position, View convertView, ViewGroup parent)
    {
        convertView = getItemView(convertView, R.layout.track_listitem_track, parent);

        ViewGroup list_item = getView(convertView, R.id.list_item);
        final TextView tv_text = getView(convertView, R.id.tv_text);

        final HashMap<String, Object> track = getItem(position);
        String description = (String) track.get("text");//编号
        tv_text.setText(description);

        return convertView;
    }
}
